package com.auction.job.core.schedule;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.util.Random;
import java.util.concurrent.TimeUnit;

/**
 * Created by nichole on 2017/8/16.
 */
public abstract class BaseJob extends QuartzJobBean {
    protected final Logger LOG = LoggerFactory.getLogger(this.getClass());


    public void sleep() {
        try {
            int seconds = new Random().nextInt(3);
            TimeUnit.SECONDS.sleep(seconds);
        } catch (Exception e) {
        }
    }
}
